<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="../js/jquery-1.11.3.js"></script>
    <script>
        $(function(){
            var a = 10;
        })
        $(function(){
            $('input').click(function(){
                alert('哈哈')
                alert(a)//a  为 未定义
            })
        })

    </script>
</head>
<body>
<input type="button" value="点我">


</body>
</html>